<?php $_cat = $this->getNowCategory();?>
<?php $slides = $this->getSlide();?>
<div class="title_page">
        <h3>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td style="text-transform:capitalize;"><?php echo $_cat->getName();?></td>
              <td align="right"><a href="<?php echo $this->getBackUrl();?>">Back To >></a><span>All Manufacturers</span></td>
            </tr>
          </table>
        </h3>
      </div>
      <div class="motorhome_brand">
        <div class="slide_img">
          <DIV id=idContainer2 class=container>
            <TABLE id=idSlider2 border=0 cellSpacing=0 cellPadding=0>
              <TBODY>
                <TR>
                <?php if($slides->getSize() > 0):?>
                <?php foreach($slides as $slide):?>
                  <TD class="td_f"><div class="title_div"><div class="car_title"><?php echo $slide->getName();?></div></div><A href="<?php echo $slide->getProductUrl(); ?>" target="_blank"><IMG src="<?php echo $this->helper('catalog/image')->init($slide, 'thumbnail')->resize(465, 300); ?>"></A></TD>
                <?php endforeach;?> 
                <?php else :?>
                <TD class="td_f">No product.</TD>
                <?php endif;?>
                </TR>
              </TBODY>
            </TABLE>
             <a onClick="st.Next()" class="img_next"></a>
            <a onClick="st.Previous()"class="img_pre"></a>
            <UL id=idNum class=num>
            </UL>
          </DIV>
          <SCRIPT>
	var forEach = function(array, callback, thisObject){
		if(array.forEach){
			array.forEach(callback, thisObject);
		}else{
			for (var i = 0, len = array.length; i < len; i++) { callback.call(thisObject, array[i], i, array); }
		}
	}
	var img_numner = document.getElementById("idSlider2").getElementsByTagName("td").length;
	var st = new SlideTrans("idContainer2", "idSlider2", img_numner, { Vertical: false });
	
	var nums = [];
	//插入数字
	for(var i = 0, n = st._count - 1; i <= n;){
		(nums[i] = $("idNum").appendChild(document.createElement("li"))).innerHTML = ++i;
	}
	
	forEach(nums, function(o, i){
		o.onmouseover = function(){ o.className = "on"; st.Auto = false; st.Run(i); }
		o.onmouseout = function(){ o.className = ""; st.Auto = true; st.Run(); }
	})
	
	//设置按钮样式
	st.onStart = function(){
		forEach(nums, function(o, i){ o.className = st.Index == i ? "on" : ""; })
	}
	st.Run();
</SCRIPT>
        </div>
        <div class="car_brand_des">
          <div class="car_brand_des_box">
            <div class="car_logo"><img src="<?php echo Mage::getModel('imageresize/imagemodel')->init($_cat->getImageUrl())->resize(257,75);?>"/></div>
            <h1>About <?php echo $_cat->getName();?></h1>
            <p><?php echo $_cat->getDescription();?></p>
            <div class="view_now"><a href="<?php echo $this->getUrl().$_cat->getUrlPath() . '?list=true'; ?>">View Available Models Now</a></div>
          </div>
        </div>
        <div class="clearfloat"></div>
        <div class="model_infor">
          <div class="model_infor_box">
            <h1>Model Information</h1>
            <?php echo $_cat->getModelInformation();?>
            <a class="bt_a" href="#">Download The Autotrail 2011 Brochure</a> </div>
          <div class="brand_rate">
          <form action="<?php echo $this->getUrl('contacts/index/starcatpost');?>" id="star_form" method="post">
				
            <span>Rate <?php echo $_cat->getName();?></span><div class="tip_pop"><img id="rate_auto_trail_tip_img" src="<?php echo $this->getSkinUrl('images/gantan_blue.png');?>"/><table cellspacing="0" cellpadding="0" class="tip_table" id="rate_auto_trail_tip" style="display: none;">
                  <tbody><tr>
                    <td class="tip_top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td class="tip_center">Tip Information...</td>
                  </tr>
                  <tr>
                    <td class="tip_bottom">&nbsp;</td>
                  </tr>
                </tbody></table></div>
                <div class="wujiaoxing_options">
                <a href="javascript:" class="wujiao1" onClick="wujiaoxing(this,1)"></a>
                <a href="javascript:" class="wujiao1" onClick="wujiaoxing(this,2)"></a>
                <a href="javascript:" class="wujiao1" onClick="wujiaoxing(this,3)"></a>
                <a href="javascript:" class="wujiao1" onClick="wujiaoxing(this,4)"></a>
                <a href="javascript:" class="wujiao1" onClick="wujiaoxing(this,5)"></a>
                <input type="hidden" value="" name="star" id="star_val"/>
				<input type="hidden" name="cat_id" value="<?php echo $_cat->getId();?>"/>
                <input type="image" src="<?php echo $this->getSkinUrl('images/sword_circle.png');?>" class="bt_sword"/>
                
                </div>
          		</form>
          </div>
          <div class="keep_me">
            <div class="keep_me_box">
            <?php $news_from = $this->getNewsFrom();?>
              <div class="keep_me_box_wrapper">
                <h1>Keep me updated with Autotrail news</h1>
                <form action="<?php echo $this->getUrl('newsletter/subscriber/new');?>" method="post" id="detail_page_news_form">
                <input type="hidden" name="type" value="2"/>
                <input type="hidden" name="cat" value="<?php echo $_cat->getId(); ?>"/>
                <table class="keep_table" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><input type="text" name="name" id="name" class="input7 name_tip" value=""/></td>
                  </tr>
                  <tr>
                    <td><input type="text" name="email" id="email" class="input7 email_tip" value=""/></td>
                  </tr>
                  <tr>
                    <td><span class="title">I also want news from...</span></td>
                  </tr>
                  <tr>
                    <td class="moni_td">
                    <div tabindex="0" onclick="optionSelector(this)" class="moni_s car_brand">
                        <input type="hidden" id="other_news" name="other_news" class="true_value" value="0"/>
                        <input type="text" value="Please select An Option..." class="select3 show_value" id="other_news_list" name="other_news_list">
                        <ul style="" class="Option">
                        <?php foreach ($news_from as $from):?>
                          <li value="<?php echo $from->getId();?>"><span><?php echo $from->getName();?></span></li>
						<?php endforeach;?>
                        </ul>
                      </div></td>
                  </tr>
                  <tr>
                    <td><input name="agree_terms" id="agree_terms" class="check_box" type="checkbox" value="">
                      <span class="agree_infor">I agree to Brownhills <a href="#" target="_blank">Terms & Conditions</a></span></td>
                  </tr>
                  <tr>
                    <td align="right" class="bt_td"><input type="image" class="submit_button" src="<?php echo $this->getSkinUrl('images/bt_submit.png');?>"/></td>
                  </tr>
                </table>
                </form>
              </div>
            </div>
            <div class="view_now"><a href="<?php echo $this->getUrl().$_cat->getUrlPath() . '?list=true'; ?>">View Available Models Now</a></div>
          </div>
        </div>
        <div class="clearfloat"></div>
      </div>